1 using UnityEngine;
2 using
System.Collections;
3
4 public
class InterpolationFade : InterpolationProcess {
5     
public override float apply(float a)
6     {
7         
return clamp(a * a * a * (a * (a * 6 - 15) + 10), 0, 1);
8     }
9
10     
private float clamp(float value, float min, float max)
11     {
12         
if (value < min) return min;
13         
if (value > max) return max;
14         
return value;
15     }
16 }



Trò chơi đua xe động vật trong UNITY Engine 114.700 lượt xem

Gõ tìm kiếm nhanh...